<template>
    <view class="indexs">
        <view :class="'header ' + (banertrue ? 'header_lan' : '')" :style="'padding-top: ' + navH + 'px;'">
            <view class="header_height" :style="'height:' + gaodu + 'px;line-height:' + gaodu + 'px;top:' + gaodutops + 'px;'">
                <view class="index_h_cont3">
                    <view class="index_wenben_img" @tap="jumpzuo">
                        <image :src="imgUrl+'/dzx_img22.png'" mode="widthFix"></image>
                    </view>
                    <view class="index_wenben baise">{{ $t('page_my_tixianmx.Withdrawal_details') }}</view>
                </view>
            </view>
            <view class="coloe_title">s</view>
        </view>
        <view class="index_banner" style="position: absolute; background: #fff">
            <image :src="imgUrl+'/dzx_img156.png'" mode="widthFix"></image>
        </view>
        <view class="index_center" :style="'padding-top:' + (navH + 50) + 'px;'">
                <view class="my_yongbingmx_item2">
                    <view class="my_yongbingmx_item2_padding">
                        <view class="my_yongbingmx_item2_list">
                            <view class="my_yongbingmx_item2_cont" v-for="(item, index) in arrlist" :key="index">
                                <view class="my_yongbingmx_item2_cont_l">
                                    <view class="my_yongbingmx_item2_t1">{{ $t('page_my_tixianmx.Withdraw_cash') }}</view>
                                    <view class="my_yongbingmx_item2_t2">{{item.create_time}}</view>
                                </view>
                                <view class="my_yongbingmx_item2_cont_r">{{item.flow_type==10?'+':'-'}}{{item.money}}</view>
								<!-- 申请状态 (10待审核 20审核通过 30驳回 40已打款) -->
								<view class="my_yongbingmx_item2_cont_r" v-if="item.apply_status==10">{{ $t('page_my_tixianmx.moderated') }}</view>
								<view class="my_yongbingmx_item2_cont_r" v-if="item.apply_status==20">{{ $t('page_my_tixianmx.Be_approved') }}</view>
								<view class="my_yongbingmx_item2_cont_r" v-if="item.apply_status==30">{{ $t('page_my_tixianmx.reject') }}</view>
								<view class="my_yongbingmx_item2_cont_r" v-if="item.apply_status==40">{{ $t('page_my_tixianmx.paid') }}</view>
                            </view>
                        </view>
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
// pages/shouye/shouye_zkc/shouye_zkc.js
const app = getApp();
let request = require('../../../utils/require');
export default {
    data() {
        return {
            navH: app.globalData.navHeight,
            gaodu: app.globalData.height,
            gaodutops: app.globalData.top,
			imgUrl:app.globalData.imgUrl,
            banertrue: false,
            isshow: false,
			arrlist:[],
            isshow2: false
        };
    }, //滑动显示顶部
    onPageScroll: function (e) {
        if (e.scrollTop > this.navH + 50) {
            this.banertrue= true
        } else {
            this.banertrue= false
        }
    },
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad() {
        var that = this;
		that.dealerlist();
    },
    onShow() {
        var that = this;
		
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {
		//获取所有的分销订单
		dealerlist(e) {
		    var that = this;
		    var data = {
		        type: e,
		        token: uni.getStorageSync('token'),
		        page: that.page
		    };
		    request.get(`index.php?s=/api/user.dealer.Withdraw/lists&wxapp_id=` + uni.getStorageSync('web_id'), data).then((res) => {
		        if (res.data.code == 1) {
		            if (that.page > res.data.data.last_page) {
		                that.ispage= false
		            } else {
		                console.log(that.arrlist, '????arrlist');
		                that.total=res.data.data.total
		                that.arrlist= that.arrlist.concat(res.data.data.list.data)
		            }
		        }
		    });
		},
		
        quanbushow2() {
            this.isshow2= !this.isshow2,
            this.isshow= false
        },

        quanbushow() {
            this.isshow= !this.isshow
            this.isshow2= false
        },

        jumpzuo() {
            uni.navigateBack()
        }
    }
};
</script>
<style>
@import './my_yongbingmx.css';
</style>
